package com.lyh.utils;

import com.lyh.pojo.Result;

public class ResultUtils {
    public static Result<String> getResult(boolean flag, String msg, int errorType, String url){
        Result<String> result = new Result<>();
        result.setFlag(flag);
        result.setMsg(msg);
        result.setUrl(url);
        result.setErrorType(errorType);
        return result;
    }

    public static Result<String> getResult(boolean flag, String url){
        return getResult(flag,null,-2, url);
    }

    public static Result<String> getResult(boolean flag, String msg, int errorType){
        return getResult(flag,msg,errorType,null);
    }

}
